window.onload = function() {
    document.querySelector('button').onclick = async function() {
        let res = await ajax({
            url: '/login',
            type: 'POST',
            params: {
                name: userName.value,
                password: userPassword.value,
            }
        })
        console.log(res);
    }
}